<ui:composition xmlns="http://www.w3.org/1999/xhtml"
	xmlns:s="http://jboss.com/products/seam/taglib"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:rich="http://richfaces.org/rich"
	xmlns:a4j="http://richfaces.org/a4j">

	<rich:panel id="Edit" styleClass="form">
		


			<a4j:form ajaxSingle="true">
				<h:panelGrid>
					<div class="attributes">
				
							<s:decorate template="/layout/input.xhtml">
								<ui:define name="label">Moneda</ui:define>
							
								
								<rich:comboBox value="#{editQuotation.currencyDesc}" 
								id="QuotationCurrency"
								converter="#{currencyConverter}"
								converterMessage="Favor seleccione la moneda"
								defaultLabel="Seleccione la moneda"
								enableManualInput="false"
								required="true"
								requiredMessage="Favor seleccione la moneda">
															
									<s:selectItems  value="#{withinHolder.currencyList()}" var="cur" label="#{cur.descrip}">
									</s:selectItems>
									
								</rich:comboBox>
								<div class="msg_container">
								<rich:message for="QuotationCurrency"/>
								</div>
								
							</s:decorate>
							<div style="clear: both;" />
							
							<s:decorate template="/layout/input.xhtml">
								<ui:define name="label">Compra</ui:define>
								<h:inputText value="#{editQuotation.editQuotation.buyAmount}"
									id="QuotationBuy" 
									required="true" size="5"
									requiredMessage="Favor introduzca el monto de compra"
									validatorMessage="El monto no puede ser menor a 1 o mayor a 7">
									<f:validateLength minimum="1" maximum="7" />
									<a4j:support event="onblur" />
									
								</h:inputText>
								<div class="msg_container">
								<rich:message for="QuotationBuy"/>
								</div>
							</s:decorate>
							<div style="clear: both;" />
							
							<s:decorate template="/layout/input.xhtml">
								<ui:define name="label">Venta</ui:define>
								<h:inputText value="#{editQuotation.editQuotation.saleAmount}"
									id="QuotationSale" 
									required="true" size="5"
									requiredMessage="Favor introduzca el monto de venta"
									validatorMessage="El monto no puede ser menor a 1 o mayor a 7">
									<f:validateLength minimum="1" maximum="7" />
									<a4j:support event="onblur" />
									
								</h:inputText>
								<div class="msg_container">
								<rich:message for="QuotationSale"/>
								</div>
							</s:decorate>
							<div style="clear: both;" />
							
							
							
							<s:decorate template="/layout/input.xhtml">
								<ui:define name="label">Activo</ui:define>
								<h:selectBooleanCheckbox value="#{editQuotation.editQuotation.status}" id="QuotationStatus"
								required="false" 
								validatorMessage="El estado no puede ser menor o mayor a 1">
								<a4j:support event="onblur" />
								</h:selectBooleanCheckbox>
								
								<div class="msg_container">
									<rich:message for="QuotationState"/>
								</div>
							</s:decorate>
					</div>
		
		
				<s:decorate template="/layout/displayButton.xhtml">
					<a4j:commandButton value="Guardar"
						action="#{editQuotation.dataToEditUpd()}"
						oncomplete="#{rich:component('modalPanel')}.hide()"
						reRender="quotationGridForm, quotationForm" />
					<rich:spacer width="20px" />
					<a4j:commandButton value="Cancelar"
						oncomplete="#{rich:component('modalPanel')}.hide()">
					</a4j:commandButton>
				</s:decorate>
			
			</h:panelGrid>
		</a4j:form>
	</rich:panel>
</ui:composition>